package ${cfg.hystrixPathImpl};

import com.book.common.api.impl.BaseHystrixImpl;
import ${cfg.dtoPath}.${entity}Dto;
import ${cfg.voPath}.${entity}Vo;
import ${cfg.hystrixPath}.I${entity}Hystrix;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Description：${table.comment!} HystrixImpl
 * @Author： ${author}
 * @CreateDate： ${date}
 * @Email： ${cfg.email}
 * Version: ${cfg.version}
 */
@Slf4j
@Component
public class ${entity}HystrixImpl extends BaseHystrixImpl<${entity}Dto, ${entity}Vo> implements FallbackFactory<I${entity}Hystrix>, I${entity}Hystrix {

    @Override
    public I${entity}Hystrix create(Throwable e) {
        log.error("${cfg.applicationName}.${entity}HystrixImpl.${table.comment!}服务调用失败:{}", e.getMessage());
        e.printStackTrace();
        return new ${entity}HystrixImpl();
    }
}
